﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Web.Mvc;
using System.Data.Entity;

namespace MvcMusicStore.Models
{
    [Bind(Exclude="AlbumId")]
    public class Album
    {
        [ScaffoldColumn(false)]
        public int AlbumId { set; get; }
        [DisplayName("Genre")]
        public int GenreId { set; get; }
        [DisplayName("Artist")]
        public int ArtistId { set; get; }
        [Range(0.01,100.00,ErrorMessage="Price must be between 0.01 and 100.00")]
        public decimal Price { set; get; }
        [DisplayName("Album Art Url")]
        [StringLength(1024)]
        public string AlbumArtUrl { set; get; }
        [Required(ErrorMessage="an album title is required")]
        [StringLength(160)]
        public string Title { set; get; }
        public virtual Genre Genre { set; get; }
        public virtual Artist Artist { set; get; }
    }
}